package com.enum1;

public class EnumDemo1 {
    public static void main(String[] args) {
        System.out.println(Week.星期一);
        System.out.println(Week.星期二);
        System.out.println(Week.星期三);
        System.out.println(Week.星期四);
        System.out.println(Week.星期五);
        System.out.println(Week.星期六);
        System.out.println(Week.星期日);
        // 获取枚举对象
        Week[] weeks = Week.values();
        for (Week week : weeks) {
            System.out.println(week);
        }
        //其实这个等效于
        Week week = Week.valueOf("星期一");//等效于 Week.星期一
        Week week1 = Week.星期一;

        System.out.println(week);

    }
}
